package cn.java75.mybatisplus.ctrl;

import cn.java75.mybatisplus.dao.SubjectMapper;
import cn.java75.mybatisplus.entity.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author oldliu
 * @since 1.0
 */
@RestController
public class HelloController {
    @Autowired
    private SubjectMapper subjectMapper;
    @GetMapping("addsubject")
    public int add(){
        Subject s=new Subject(-1,3,"21天精通mybatis",299);
        return subjectMapper.insert(s);
    }
}
